<?php
/*
  -----------------------------------------------------------------
  Copyright (c) 2010 25Solutions   All Rights Reserved.

  This software is the confidential and proprietary information
  of 25Solutions ("Confidential Information").
  You shall not disclose such Confidential Information and shall
  use it only in accordance with the terms of the license
  agreement you entered into with 25Solutions
  -----------------------------------------------------------------
 */
?>
<h1>"<?php echo $campaign->getName() ?>" stats:</h1>
<table>
    <tr>
        <th>
            Status:
        </th>
        <td>
            <div class="campaignstatus_<?php echo $campaign->getStatus() ?>">
                <?php echo $campaign->getStatus() ?>
            </div>
        </td>
    </tr>
    <tr>
        <th>
            Number of recipients:
        </th>
        <td>
            <?php echo $recipientCount ?>
            </td>
        </tr>
        <tr>
            <th>
                Sent mails:
            </th>
            <td>
            <?php echo $sent ?>
            </td>
        </tr>
        <tr>
            <th>
                Completion ratio:
            </th>
            <td>
                <div class="progressbar" id="sentprogressbar"></div>
                <span class="progressbartext"><?php echo round($completionRatio, 2) ?>%</span>
            </td>
        </tr>
        <tr>
            <th>
                Number of clicks:
            </th>
            <td>
            <?php echo $clicks ?>
            </td>
        </tr>
        <tr>
            <th>
                Clicks ratio:
            </th>
            <td>
                <div class="progressbar" id="clickprogressbar"></div>
                <span class="progressbartext"><?php echo round($clickRatio, 2) ?>%</span>
            </td>
        </tr>
        <tr>
            <th>
                Pie chart:
            </th>
            <td>
                <?php stOfc::createChart(350, 350, '@campaign_pie?campaign_id='.$campaign->getCampaignId(), false); ?>
            </td>
        </tr>

        
    </table>


    <script type="text/javascript">
        $("#sentprogressbar").progressbar({
            value: <?php echo $completionRatio ?>
        });
        $("#clickprogressbar").progressbar({
            value: <?php echo $clickRatio ?>
    });
</script>



